<?php
include dirname(__FILE__).'/../Control/AdminControl.cls.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=$Project ?></title>		
	<!--                       CSS                       -->
	<link rel="stylesheet" href="../Resources/Css/reset.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="../Resources/Css/pages.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="../Resources/Css/invalid.css" type="text/css" media="screen" />	


	<!--                       Javascripts                       -->
	<script type="text/javascript" src="../Resources/Scripts/jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="../Resources/Scripts/simpla.jquery.configuration.js"></script>
	<script type="text/javascript" src="../Resources/Scripts/facebox.js"></script>
	<script type="text/javascript" src="../Resources/Scripts/jquery.wysiwyg.js"></script>
	<script type="text/javascript" src="../Resources/Scripts/jquery.datePicker.js"></script>
	<script type="text/javascript" src="../Resources/Scripts/jquery.date.js"></script>		
</head>
<body>
<?php
$Admin = new AdminControl();
If (  Get::getByKey('action')=='del'){
  $Admin->del[TABLENAME](Get::getByKey('id'));
}
	$whstr  = array();
	$fied = Get::getByKey('field');
	$fvalue =Get::getByKey('fvalue');
	if ($fied != "" && $fvalue!="")
		$whstr = array($fied =>$fvalue);
    $Arr = $Admin->list[TABLENAME]($whstr);
?>
<div id="main-content">		
				<div class="content-box">
				<div class="content-box-header">					
					<h3>当前位置：<?=$Project?>管理系统 &gt; [TABLENAMECN]</h3>					
					<ul class="content-box-tabs">
						<li><a href="#tab1" class="default-tab">列表</a></li>
					</ul>					
					<div class="clear"></div>					
				</div> 
				<div class="content-box-content">					
					<div class="tab-content default-tab" id="tab1"> 
						<div class="notification attention png_bg">
							<a href="#" class="close"><img src="images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
							<div>
								关于管理系统的一些说明.
							</div>
						</div>						
						<table>							
							<thead>
								<tr>
								   <th>[PRIKEY]</th>
								   <!--TABLEHEADER-->
								   <th>管理&nbsp;&nbsp;<a href="Add[TABLENAME].php">添加</a></th>								   
								</tr>
							</thead>
							<tfoot>
								<tr>
									<td colspan="[SHOWNUMS]">
										<?=$Admin->showPages()?>
									</td>
								</tr>
							</tfoot>
							<tbody>
   <?php
		foreach($Arr as $key){
    ?> 					
								<tr>
									<td><?=$key->[PRIKEY]?></td>
									<!--TABLEBODY-->
									<td>
										 <a href="Edit[TABLENAME].php?id=<?=$key->[PRIKEY]?>" title="Edit"><img src="images/icons/pencil.png" alt="Edit" /></a>
										 <a href="?action=del&id=<?=$key->[PRIKEY]?>" title="Delete"><img src="images/icons/cross.png" alt="Delete" /></a>									
									</td>
								</tr>														
	<?
		}
	?>
							</tbody>
							
						</table>
						
					</div>
					
				</div> 
</div>
</div>

</body>  
</html>
